------------------------------------------------------------------------------------
       log:  C:\Users\Rich\Desktop\GRT_IO2007\GRT_IO_2007.log
  log type:  text
 opened on:  13 Oct 2008, 23:35:47

. 
. 
. **************************************
. * DESCRIBE AND SUMMARIZE RAW DATASET *
. **************************************
. 
. des

Contains data from GRT_IO_2007.dta
  obs:       381,656                          
 vars:            25                          15 Jul 2007 18:22
 size:    46,943,688 (85.1% of memory free)
------------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
------------------------------------------------------------------------------------
name_1          str33  %33s                   NAME_1
name_2          str33  %33s                   NAME_2
tomz_1          int    %10.0g                 Code for country 1
tomz_2          int    %10.0g                 Code for country 2
directed_dyad~d float  %9.0g                  FE: one for each directed dyad
year            int    %10.0g                 YEAR
imports         float  %9.0g                  Imports: log of 1967 US$
gatt_1          str7   %9s                    GATT: Status of country 1
gatt_2          str7   %9s                    GATT: Status of country 2
gatt35_1        byte   %10.0g                 GATT35_1
gatt35_2        byte   %10.0g                 GATT35_2
colorbit        byte   %8.0g                  COL: In same colonial orbit
currencyunion   byte   %10.0g                 Strict currency union (Rose)
gsp             byte   %8.0g                  GSP: Exists in dyad
ptarecip        byte   %8.0g                  Reciprocal PTA
ptanonrecip     byte   %8.0g                  Non-reciprocal PTA
distance        float  %9.0g                  GEO: Log of distance (km)
share_border    byte   %10.0g                 GEO: Countries share land border
landlocked      byte   %8.0g                  GEO: # of landlocked countries
island          byte   %8.0g                  GEO: Number of islands
land_area       float  %9.0g                  GEO: Log Product land area
share_language  byte   %10.0g                 CULT: Main language in common
gdp             float  %9.0g                  ECON: GDP Log product ('67 USD)
industrial_both byte   %8.0g                  ECON: Both industrial
industrial_none byte   %8.0g                  ECON: None industrial
------------------------------------------------------------------------------------
Sorted by:  name_1  name_2  year

. su

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
      name_1 |         0
      name_2 |         0
      tomz_1 |    381656     526.176    86.13674        383        811
      tomz_2 |    381656    525.7769    87.97122        383        811
directed_d~d |    381656    526701.8    86145.62     383390     811760
-------------+--------------------------------------------------------
        year |    381656    1980.795    15.55952       1946       2004
     imports |    381656    15.17295    2.287846   11.51302   24.55006
      gatt_1 |         0
      gatt_2 |         0
    gatt35_1 |    381656    .0032045    .0565172          0          1
-------------+--------------------------------------------------------
    gatt35_2 |    381656    .0030918    .0555179          0          1
    colorbit |    381656    .0042525    .0650726          0          1
currencyun~n |    381656    .0114658    .1064631          0          1
         gsp |    381656    .3087126    .4619628          0          1
    ptarecip |    381656    .1192383    .3240691          0          1
-------------+--------------------------------------------------------
 ptanonrecip |    381656    .0627738     .242556          0          1
    distance |    381656    8.544438    .8510218   4.772036   9.895504
share_border |    381656    .0462982    .2101305          0          1
  landlocked |    381656    .2542316    .4740178          0          2
      island |    381656    .1829213    .4096308          0          2
-------------+--------------------------------------------------------
   land_area |    381656    25.11978    2.651946   13.47495    32.9672
share_lang~e |    381656    .1270725    .3330547          0          1
         gdp |    381656    45.84444    2.460036   35.82043   55.88262
industrial~h |    381656    .0759087    .2648523          0          1
industrial~e |    381656     .413257    .4924188          0          1

. 
. *****************************************************
. * CREATE DUMMY VARIABLES FOR GATT/WTO PARTICIPATION *
. *****************************************************
. 
. * Gatt: Formal membership
. gen byte gattF_1 = cond(gatt_1=="wto"|gatt_1=="art33"|gatt_1=="orig"|gatt_1=="art2
> 6:5", 1, 0)  /* GATT: Country 1 is formal member */

. gen byte gattF_2 = cond(gatt_2=="wto"|gatt_2=="art33"|gatt_2=="orig"|gatt_2=="art2
> 6:5", 1, 0)  /* GATT: Country 2 is formal member */

. 
. * Gatt: Nonmember participant
. gen byte gattN_1 = cond(gatt_1=="col"|gatt_1=="df"|gatt_1=="prov", 1, 0) /* GATT: 
> Country 1 is a NMP */

. gen byte gattN_2 = cond(gatt_2=="col"|gatt_2=="df"|gatt_2=="prov", 1, 0) /* GATT: 
> Country 2 is a NMP */

. 
. * Gatt: Participation (EITHER formal OR defacto)
. gen byte gattP_1 = cond(gatt_1=="out", 0, 1) /* GATT: Country 1 participates */

. gen byte gattP_2 = cond(gatt_2=="out", 0 ,1) /* GATT: Country 2 participates */

. 
. * Gatt: Interactions
. gen byte gattPP = cond(gattP_1==1 & gattP_2==1, 1, 0)

. label var gattPP "GATT: Both Participate"

. gen byte gattPO = cond((gattP_1==1 & gattP_2==0)|(gattP_1==0 & gattP_2==1), 1, 0)

. label var gattPO "GATT: Only one participates"

. gen byte gattFF = cond(gattF_1==1 & gattF_2==1,1,0)

. label var gattFF "GATT: Both are formal members"

. gen byte gattFN = cond((gattF_1==1 & gattN_2==1)|(gattN_1==1 & gattF_2==1),1,0)

. label var gattFN "GATT: One formal, one NMP"

. gen byte gattFO = cond((gattF_1==1 & gattP_2==0)|(gattP_1==0 & gattF_2==1),1,0)

. label var gattFO "GATT: One formal, other is out"

. gen byte gattNN = cond(gattN_1==1 & gattN_2==1,1,0)

. label var gattNN "GATT: Both nonmbr participants"

. gen byte gattNO = cond((gattN_1==1 & gattP_2==0)|(gattP_1==0 & gattN_2==1),1,0)

. label var gattNO "GATT: One NMP, other is out"

. drop gattF_1 gattF_2 gattN_1 gattN_2 gattP_1 gattP_2 

. 
. gen byte round1 = cond(year < 1949, 1, 0)                 /* GATT pre Annecy round
>  */

. gen byte round2 = cond(year >= 1949 & year < 1951, 1, 0)  /* Annecy to Torquay rou
> nd */

. gen byte round3 = cond(year >= 1951 & year < 1956, 1, 0)  /* Torquay to Geneva */

. gen byte round4 = cond(year >= 1956 & year < 1961, 1, 0)  /* Geneva to Dillon */

. gen byte round5 = cond(year >= 1961 & year < 1967, 1, 0)  /* Dillon to Kennedy */

. gen byte round6 = cond(year >= 1967 & year < 1979, 1, 0)  /* Kennedy to Tokyo */

. gen byte round7 = cond(year >= 1979 & year < 1994, 1, 0)  /* Tokyo to Uruguay */

. gen byte round8 = cond(year >= 1994, 1, 0)                /* After Uruguay round *
> /

. forvalues i = 1/8 {                                  /* create variables for each 
> of 8 rounds */ 
  2.    gen byte gattPP_round`i' = gattPP * round`i'
  3.    label var gattPP_round`i' "GATT: Both Participate, Round `i'"              
  4.    gen byte gattPO_round`i' = gattPO * round`i'
  5.    label var gattPO_round`i' "GATT: One Participates, Round `i'"             
  6.    local gattPPbyround `gattPPbyround' gattPP_round`i'
  7.    local gattPObyround `gattPObyround' gattPO_round`i'
  8. }

. drop round1-round8

. 
. * Article 35 invoked by one or both countries?
. gen byte gatt35x1 = cond((gatt35_1==1 & gatt35_2==0)|(gatt35_1==0 & gatt35_2==1),1
> ,0) /* only one invokes */

. label var gatt35x1 "GATT: One invokes Art 35"

. gen byte gatt35x2 = cond(gatt35_1==1 & gatt35_2==1,1,0)  /* both invoke */

. label var gatt35x2 "GATT: Both invoke Art 35"

. 
. ****************************
. * GENERATE OTHER VARIABLES *
. ****************************
. 
. quietly tab year, gen(yeardummy)

. gen byte ptarecip_nohigher = cond(ptarecip == 1 & colorbit==0, 1, 0)

. gen byte ptarecip_withhigher = cond(ptarecip == 1 & colorbit==1, 1, 0)

. gen byte gattPP_nocolrecip = cond(gattPP == 1 & colorbit==0 & ptarecip==0, 1, 0)

. gen byte gattPP_withcolrecip = cond(gattPP == 1 & (colorbit==1 | ptarecip==1),1,0)

. gen byte gattPO_nocolrecip = cond(gattPO == 1 & colorbit==0 & ptarecip==0, 1, 0)

. gen byte gattPO_withcolrecip = cond(gattPO == 1 & (colorbit==1 | ptarecip==1),1,0)

. gen byte nonrecip_nohigher = cond((gsp==1 | ptanonrecip==1) & colorbit == 0 & ptar
> ecip==0 & gattPP==0 & gattPO==0,1,0)

. gen byte nonrecip_withhigher = cond((gsp==1 | ptanonrecip==1) & (colorbit==1 | pta
> recip==1 | gattPP==1 | gattPO==1),1,0)

. 
. ************************************************************
. * TABLE 1: THE APPARENT IRRELEVANCE OF GATT/WTO MEMBERSHIP *
. ************************************************************
. 
. di in white _n(2) "Formal membership only: full gravity model with time effects"


Formal membership only: full gravity model with time effects

. areg imports gattFF gattFO ptarecip ptanonrecip gsp currencyunion colorbit gdp dis
> tance share_language share_border landlocked island land_area, absorb(year) cluste
> r(directed_dyad_id) robust

Linear regression, absorbing indicators                Number of obs =  381656
                                                       F( 14, 17358) = 2455.43
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.6130
                                                       Adj R-squared =  0.6129
                                                       Root MSE      =  1.4234

                   (Std. Err. adjusted for 17359 clusters in directed_dyad_id)
------------------------------------------------------------------------------
             |               Robust
     imports |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      gattFF |  -.0700806   .0257039    -2.73   0.006    -.1204628   -.0196984
      gattFO |   -.211151   .0250057    -8.44   0.000    -.2601647   -.1621373
    ptarecip |   .3344102   .0266018    12.57   0.000      .282268    .3865525
 ptanonrecip |   .1393633   .0349939     3.98   0.000     .0707717     .207955
         gsp |  -.0970094   .0216108    -4.49   0.000    -.1393686   -.0546501
currencyun~n |   1.009628    .075064    13.45   0.000      .862495    1.156761
    colorbit |    1.75482   .1039452    16.88   0.000     1.551077    1.958563
         gdp |   .7711781   .0051803   148.87   0.000     .7610242    .7813321
    distance |  -.7084821   .0149929   -47.25   0.000    -.7378697   -.6790946
share_lang~e |   .3565317    .034017    10.48   0.000     .2898549    .4232084
share_border |    .576952   .0594964     9.70   0.000      .460333    .6935709
  landlocked |  -.1421373   .0197549    -7.20   0.000    -.1808589   -.1034158
      island |   .2368898   .0316585     7.48   0.000      .174836    .2989437
   land_area |  -.0950277   .0048734   -19.50   0.000    -.1045799   -.0854754
       _cons |  -11.75428   .2517323   -46.69   0.000     -12.2477   -11.26086
-------------+----------------------------------------------------------------
        year |   absorbed                                      (59 categories)

. estimates store t1_c1

. di in white _n(2) "Formal membership only: gravity model with directed-dyad and ti
> me effects, sample=`i'"


Formal membership only: gravity model with directed-dyad and time effects, sample=

. areg import gattFF gattFO ptarecip ptanonrecip gsp currencyunion colorbit gdp year
> dummy*, absorb(directed_dyad_id) cluster(directed_dyad_id) robust
--Break--
r(1);

end of do-file

--Break--
r(1);


. 
. edit
- preserve

. do "C:\Users\Rich\AppData\Local\Temp\STD0e000000.tmp"

. 
. version 9.2

. about

Stata/IC 10.0 for Windows
Born 03 Mar 2008
Copyright (C) 1985-2008

Total physical memory:     2087488 KB
Available physical memory:  901052 KB

Single-user Stata for Windows perpetual license:
       Serial number:  1910042301
         Licensed to:  Rich Nielsen
                       Harvard University

. clear

. set mem 300m
(307200k)

. dir
  <dir>  10/13/08 23:35  .                 
  <dir>  10/13/08 23:35  ..                
  15.1k   7/16/07 12:06  GRT_IO_2007.do    
  43.3M   7/15/07 18:22  GRT_IO_2007.dta   
  12.1k  10/13/08 23:41  GRT_IO_2007.log   
   6.8k  10/13/06  8:16  rc_spline.ado     
   4.9k  10/13/06  8:16  rc_spline.hlp     
  43.0k   7/16/07 16:12  readme.doc        
  16.5k   7/16/07 16:14  readme.pdf        

. 
end of do-file

. exit, clear
